package my.action.article;

import java.util.ArrayList;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import my.controller.Action;
import my.controller.ActionForward;
import my.db.DAO.ArticleDAO;
import my.db.DAO.ArticleTypeDAO;
import my.db.DTO.ArticleDTO;
import my.db.DTO.ArticleTypeDTO;

public class PageNewArticleAction implements Action{
	@Override
	public ActionForward execute(HttpServletRequest request,HttpServletResponse response) throws Exception {
		ActionForward forward=new ActionForward();	
	 	ArticleTypeDAO atdao=new ArticleTypeDAO();
	 	ArrayList<ArticleTypeDTO> lst_atadto=new ArrayList<>();
	 	lst_atadto=atdao.getListArticleType();		 	
	 	request.setAttribute("ArticleTypeNew", lst_atadto);

	 	forward.setRedirect(false);
	 	forward.setPath("./add_new_book.jsp");		 
		return forward;
	}
	
}
